package com.example.model.article.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "ArticleConfig", description = "APP已发布文章配置")
public class ArticleConfig {
    public ArticleConfig(Long articleId) {
        this.articleId = articleId;
        this.isComment = true;
        this.isForward = true;
        this.isDelete = false;
        this.isDown = false;
    }

    @Schema(description = "主键")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "文章ID")
    private Long articleId;

    @Schema(description = "是否可评论")
    private Boolean isComment;

    @Schema(description = "是否转发")
    private Boolean isForward;

    @Schema(description = "是否下架")
    private Boolean isDown;

    @Schema(description = "是否已删除")
    private Boolean isDelete;
}
